package com.laiketui.common.api.plugin;

import com.laiketui.domain.user.User;
import com.laiketui.domain.vo.plugin.auction.PromiseOrderVo;
import com.laiketui.core.exception.LaiKeAPIException;

import java.util.List;
import java.util.Map;

/**
 * 公共竞拍
 *
 * @author Trick
 * @date 2021/2/23 9:23
 */
public interface PubliceAuctionService {


    /**
     * 获取竞拍商品
     * 【php indexAction.auction】
     *
     * @param storeId   -
     * @param user      - 可选
     * @param pageStart -
     * @param pageEnd   -
     * @return List
     * @throws LaiKeAPIException -
     * @author Trick
     * @date 2021/2/23 9:25
     */
    List<Map<String, Object>> getAuctionGoodsInfo(int storeId, User user, int pageStart, int pageEnd) throws LaiKeAPIException;


    /**
     * 获取竞拍记录
     *
     * @param storeId   -
     * @param aid       - 竞拍商品id
     * @param pageStart -
     * @param pageEnd   -
     * @return List
     * @throws LaiKeAPIException -
     * @author Trick
     * @date 2021/4/23 10:44
     */
    List<Map<String, Object>> getAuctionRecordInfo(int storeId, int aid, int pageStart, int pageEnd) throws LaiKeAPIException;

    /**
     * 获取竞拍-热拍商品
     * 【php auction.indexRunning】
     *
     * @param storeId -
     * @param user    -
     * @param start   -
     * @param end     -
     * @return List
     * @throws LaiKeAPIException -
     * @author Trick
     * @date 2021/4/22 11:08
     */
    List<Map<String, Object>> indexRunning(int storeId, User user, int start, int end) throws LaiKeAPIException;


    /**
     * 获取竞拍-即将开拍商品
     * 【php auction.indexReady】
     *
     * @param storeId -
     * @param start   -
     * @param end     -
     * @return List
     * @throws LaiKeAPIException -
     * @author Trick
     * @date 2021/4/22 14:23
     */
    List<Map<String, Object>> indexReady(int storeId, int start, int end) throws LaiKeAPIException;


    /**
     * 我的竞拍
     *
     * @param storeId -
     * @param user    -
     * @param start   -
     * @param end     -
     * @return List
     * @throws LaiKeAPIException -
     * @author Trick
     * @date 2021/4/22 14:33
     */
    List<Map<String, Object>> indexMy(int storeId, User user, int start, int end) throws LaiKeAPIException;


    /**
     * 获取竞拍商品明细
     *
     * @param aid  - 竞拍商品id
     * @param user -
     * @param isfx - 是否为分享
     * @return Map
     * @throws LaiKeAPIException -
     * @author Trick
     * @date 2021/4/22 16:54
     */
    Map<String, Object> getAuctionDetail(int aid, User user, boolean isfx) throws LaiKeAPIException;


    /**
     * 竞拍下单
     *
     * @param storeId   -
     * @param storeType -
     * @param aid       -
     * @param userId    -
     * @param payType   -
     * @return String
     * @throws LaiKeAPIException -
     * @author Trick
     * @date 2021/4/24 11:02
     */
    String createOrder(int storeId, Integer storeType, int aid, String userId, String payType) throws LaiKeAPIException;

    /**
     * 竞拍保证金支付回调
     *
     * @param vo      -
     * @param orderNo -
     * @throws LaiKeAPIException-
     * @author Trick
     * @date 2022/7/18 12:01
     */
    void paymentPromise(PromiseOrderVo vo, String orderNo) throws LaiKeAPIException;
}
